package cn.yunhe.service;

import cn.yunhe.dao.ITypeDao;
import cn.yunhe.entity.Type;
import cn.yunhe.util.SqlSessionFactoryUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * 邓永凯
 */
public class ITypeService {
    SqlSession sqlSession = SqlSessionFactoryUtil.getSqlSession();
    ITypeDao iTypeDao = sqlSession.getMapper(ITypeDao.class);

    /**
     * 获取所有的类别信息
     * @return list集合
     */
    public List<Type> getAllType() {
        List<Type> typeList = null;
        typeList = iTypeDao.getAllType();
        return typeList;
    }
}
